package com.tang.model.decorator.v2;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/8/19 22:15
 * @Desc
 * @Remarks
 */
public class DecoratorTest {
    public static void main(String[] args) {
        Pancakes basePancakes = new BasePancakes();
        System.out.println("品名:" + basePancakes.getMsg() + ",价格：" + basePancakes.getPrice());
        basePancakes = new EggDecorator(basePancakes);
        System.out.println("品名:" + basePancakes.getMsg() + ",价格：" + basePancakes.getPrice());
        basePancakes = new EggDecorator(basePancakes);
        System.out.println("品名:" + basePancakes.getMsg() + ",价格：" + basePancakes.getPrice());
        basePancakes = new SausageDecorator(basePancakes);
        System.out.println("品名:" + basePancakes.getMsg() + ",价格：" + basePancakes.getPrice());
    }
}
